Add the semicolon missing from the generated main.rs contents.
authorjbranchaud <jbranchaud@gmail.com>
Wed, 12 Nov 2014 05:00:05 +0000 (23:00 -0600)
committerjbranchaud <jbranchaud@gmail.com>
Wed, 12 Nov 2014 05:00:05 +0000 (23:00 -0600)
When you run `cargo new project-name --bin`, a project is generated by cargo
with a file, `src/main.rs`. This file has a main function with one line that
prints hello, world, but a semicolon is missing from the end of the
expression.

src/cargo/ops/cargo_new.rs

index e3eda89999f17a91f5380d0128e5860fbe1c766f..84ea5bda2dd4e3336b791358b72eb7f9765e2f29 100644 (file)
@@ -92,7 +92,7 @@ authors = ["{}"]
     if opts.bin {
         try!(File::create(&path.join("src/main.rs")).write_str("\
 fn main() {
-    println!(\"Hello, world!\")
+    println!(\"Hello, world!\");
 }
 "));
     } else {